<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich" >

	<ui:composition template="/templates/gerenciamentoLojista2.xhtml" >
		<ui:define name="js">
		
		</ui:define>
		<ui:define name="css">
			<link rel="stylesheet" type="text/css" href="style/folha.css" media="screen" />
			<link rel="stylesheet" type="text/css" href="style/styles3.css" media="screen" />
			<link rel="stylesheet" type="text/css" href="style/folha_lojista.css" media="screen" />
			<link rel="stylesheet" type="text/css" href="style/folha_lojista4.css" media="screen" />
			<link rel="stylesheet" type="text/css" href="style/lojistaoff.css" media="screen" />
			<style type="text/css">
			body {
				margin-left: 0px;
				margin-top: 0px;
				margin-right: 0px;
				margin-bottom: 0px;
			}
			</style>
		</ui:define>
		<ui:define name="mid">
			<h:form>
				<div class="inside_extrato">
				
					<div class="lojista_titulo1bbb"><strong>Liberação de credenciado</strong></div>

				  	<div class="box1_popup2">
				    	<div class="box_novo2">Nome</div>
				    	<div class="box_novo2">CPF/CNPJ</div>
				    	<div class="box_novo2"></div>
				    	<div class="box1b">
				    		<h:inputText value="#{liberacaoLojistaBean.nome}" style="width:200px" />
			        	</div>
				    	<div class="box1b">
				    		<h:inputText value="#{liberacaoLojistaBean.cpf}" style="width:200px" />
			        	</div>
			        	<div class="box1b">
				      		<h:selectOneMenu value="#{liberacaoLojistaBean.opcaoEscolhida}" >
		       	    			<f:selectItem itemLabel="Todos" noSelectionOption="true" />
			          			<f:selectItems value="#{liberacaoLojistaBean.opcoes}" />
			          		</h:selectOneMenu>
				    	</div>
				    	<div class="box1_campo6a">
				    		<a4j:commandLink action="#{liberacaoLojistaBean.buscar}" execute="@form" render="@all">
				    			<img src="images/lupa.gif" alt="" width="22" height="22" />
				    		</a4j:commandLink>
				    	</div>
				    	
				  	</div>
			 	 	<div class="box1_popup3" align="center">
				    	<table width="700" border="0" cellpadding="0" cellspacing="1">
				      		<tr id="texto_preto_normal">
				        		<td width="36%" height="26" align="center" bgcolor="#b5dfc9">Nome</td>
				        		<td width="34%" align="center" bgcolor="#b5dfc9">Nome Fantasia</td>
				        		<td width="15%" align="center" bgcolor="#b5dfc9">CNPJ/CPF</td>
				        		<td width="15%" align="center" bgcolor="#b5dfc9">Status</td>
			          		</tr>
			          		<a4j:repeat value="#{liberacaoLojistaBean.parceiros}" var="parceiro">
						      	<tr>
							        <td height="19" align="center" bgcolor="#eeeeee">
							        	<span id="texto_preto_normal">
							        		<h:outputText value="#{parceiro.nome}" />
							        	</span>
							        </td>
							        <td align="center" bgcolor="#eeeeee">
							        	<span id="texto_preto_normal">
							        		<h:outputText value="#{parceiro.nomeFantasia}" />
							        	</span>
							        </td>
							        <td align="center" bgcolor="#eeeeee">
							        	<span id="texto_preto_normal">
							        		<h:outputText value="#{parceiro.cpfCnpj}" />
							        	</span>
							        </td>
							        
							        <td align="center" bgcolor="#eeeeee">
							        	<span id="texto_preto_normal">
							        		<strong>
								        		<h:outputText value="P.Dados" rendered="#{parceiro.dados}"/>
								        		<a4j:commandLink action="#{liberacaoLojistaBean.autorizar}" execute="@this" render="@all" rendered="#{parceiro.statusCredenciamento == 4}" >
								        			<f:setPropertyActionListener target="#{liberacaoLojistaBean.parceiroEscolhido}" value="#{parceiro}" />
							                    
													Autorizar
												</a4j:commandLink>
												<h:outputText value="Liberado" rendered="#{parceiro.liberado}"/>
											</strong>	
							        	</span>
							        </td>
					          	</tr>
				          	</a4j:repeat>
			        	</table>
				  	</div>
				
				</div>
			</h:form>
			
		</ui:define>
	</ui:composition>

</html>